#ifndef GAMELOGIC_H
#define GAMELOGIC_H

#include <QObject>
#include "stdshared.h"

class GameLogic : public QObject
{
    Q_OBJECT
public:
    explicit GameLogic(QObject *parent = nullptr);

    /*判断角色是否获胜*/
    bool checkWin(int row,int col,Role role,int chessNum);
//    void algorithmAi(int &aiRow,int &aiCol);
    void computerMove();

    /*设置棋盘信息*/
    void setQipanBoard(Role ** board,int boardSize);
private:
    int evaluateMove(int row,int col,Role role);
signals:
    void AiPosition(int row,int col);
public slots:

private:
    /* 玩家是1，人机是2 */
    Role ** m_board;
    int m_boardSize;

};

#endif // GAMELOGIC_H
